import BasicLayout from '../../layouts/BasicLayout.vue';
import Login from '../../views/login/index.vue';

export default [
  {
    path: '/',
    redirect: '/workSpace',
  },
  {
    path: '/login',
    component: Login,
    meta: { title: '登录页面' },
  },
  {
    path: '/workspace',
    redirect: '/workspace/workbench',
    component: BasicLayout,
    meta: { title: '首页' },
    children: [
      {
        path: '/workspace/workbench',
        name: 'Workbench',
        component: () => import('../../views/workSpace/workbench/index.vue'),
        meta: {
          title: '首页',
          requireAuth: true,
          affix: true,
          closable: false,
        },
      },
    ],
  },
  // {
  //   path: '/error',
  //   component: BasicLayout,
  //   meta: { title: '错误页面' },
  //   children: [
  //     {
  //       path: '/error/401',
  //       component: () => import('../../views/error/401.vue'),
  //       meta: { title: '401' },
  //     },
  //     {
  //       path: '/error/403',
  //       component: () => import('../../views/error/403.vue'),
  //       meta: { title: '403' },
  //     },
  //     {
  //       path: '/error/404',
  //       component: () => import('../../views/error/404.vue'),
  //       meta: { title: '404' },
  //     },
  //     {
  //       path: '/error/500',
  //       component: () => import('../../views/error/500.vue'),
  //       meta: { title: '500' },
  //     }
  //   ]
  // }, {
  //   path: '/system',
  //   component: BasicLayout,
  //   meta: { title: '系统管理' },
  //   children: [
  //     {
  //       path: '/system/user',
  //       component: () => import('../../views/system/user/index.vue'),
  //       meta: { title: '用户管理', requireAuth: true },
  //     },
  //     {
  //       path: '/system/role',
  //       component: () => import('../../views/system/role/index.vue'),
  //       meta: { title: '角色管理', requireAuth: true },
  //     },
  //     {
  //       path: '/system/menu',
  //       component: () => import('../../views/system/menu/index.vue'),
  //       meta: { title: '菜单管理', requireAuth: true },
  //     },
  //     {
  //       path: '/system/organization',
  //       component: () => import('../../views/system/organization/index.vue'),
  //       meta: { title: '机构管理', requireAuth: true },
  //     },
  //     {
  //       path: '/system/dictionary',
  //       component: () => import('../../views/system/dictionary/index.vue'),
  //       meta: { title: '字典管理', requireAuth: true },
  //     },
  //     {
  //       path: '/system/file',
  //       component: () => import('../../views/system/file/index.vue'),
  //       meta: { title: '文件管理', requireAuth: true },
  //     },
  //     {
  //       path: '/system/login',
  //       component: () => import('../../views/system/login/index.vue'),
  //       meta: { title: '登录日志', requireAuth: true },
  //     },
  //     {
  //       path: '/system/option',
  //       component: () => import('../../views/system/option/index.vue'),
  //       meta: { title: '操作日志', requireAuth: true },
  //     },
  //   ]
  // }, {
  //   path: '/result',
  //   component: BasicLayout,
  //   meta: { title: '错误页面' },
  //   children: [
  //     {
  //       path: '/result/success',
  //       component: () => import('../../views/result/success.vue'),
  //       meta: { title: '成功页面', requireAuth: true },
  //     },
  //     {
  //       path: '/result/failure',
  //       component: () => import('../../views/result/failure.vue'),
  //       meta: { title: '失败页面', requireAuth: true },
  //     },
  //   ]
  // }, {
  //   path: '/list',
  //   component: BasicLayout,
  //   meta: { title: '列表页面' },
  //   children: [
  //     {
  //       path: '/table/base',
  //       component: () => import('../../views/table/base.vue'),
  //       meta: { title: '查询列表', requireAuth: true },
  //     },
  //     {
  //       path: '/table/card',
  //       component: () => import('../../views/table/card.vue'),
  //       meta: { title: '卡片列表', requireAuth: true },
  //     },
  //     {
  //       path: '/table/project',
  //       component: () => import('../../views/table/project.vue'),
  //       meta: { title: '项目列表', requireAuth: true },
  //     },
  //     {
  //       path: '/table/article',
  //       component: () => import('../../views/table/article.vue'),
  //       meta: { title: '文章列表', requireAuth: true },
  //     }
  //   ]
  // }, {
  //   path: '/form',
  //   component: BasicLayout,
  //   meta: { title: '表单页面' },
  //   children: [
  //     {
  //       path: '/form/base',
  //       component: () => import('../../views/form/base.vue'),
  //       meta: { title: '基础表单', requireAuth: true },
  //     },
  //     {
  //       path: '/form/step',
  //       component: () => import('../../views/form/step.vue'),
  //       meta: { title: '分步表单', requireAuth: true },
  //     },
  //     {
  //       path: '/form/intricate',
  //       name: 'Intricate',
  //       component: () => import('../../views/form/intricate.vue'),
  //       meta: { title: '复杂表单', requireAuth: true },
  //     },
  //     {
  //       path: '/form/step',
  //       name: 'Step',
  //       component: () => import('../../views/form/step.vue'),
  //       meta: { title: '分步表单', requireAuth: true },
  //     },
  //   ]
  // }, {
  //   path: '/directive',
  //   component: BasicLayout,
  //   meta: { title: '内置指令' },
  //   children: [
  //     {
  //       path: '/directive/permission',
  //       component: () => import('../../views/directive/permission.vue'),
  //       meta: { title: '权限指令', requireAuth: true },
  //     },
  //   ]
  // }, {
  //   path: '/component',
  //   component: BasicLayout,
  //   meta: { title: '常用组件' },
  //   children: [
  //     {
  //       path: '/component/qrcode',
  //       component: () => import('../../views/component/qrcode.vue'),
  //       meta: { title: '二维码', requireAuth: true },
  //     },
  //     {
  //       path: '/component/barcode',
  //       component: () => import('../../views/component/barcode.vue'),
  //       meta: { title: '条形码', requireAuth: true },
  //     },
  //     {
  //       path: '/component/treeSelect',
  //       component: () => import('../../views/component/treeSelect.vue'),
  //       meta: { title: '下拉树', requireAuth: true },
  //     },
  //   ]
  // },
  {
    path: '/enrollee',
    component: BasicLayout,
    meta: { title: '个人中心' },
    children: [
      {
        path: '/enrollee/profile',
        component: () => import('../../views/enrollee/profile/index.vue'),
        meta: { title: '我的资料', requireAuth: true },
      },
      {
        path: '/enrollee/message',
        component: () => import('../../views/enrollee/message/index.vue'),
        meta: { title: '我的消息', requireAuth: true },
      },
    ],
  },

  {
    path: '/personnel',
    component: BasicLayout,
    show: true,
    sort: 1,
    meta: { title: '人事管理' },
    children: [
      {
        path: '/personnel/records',
        component: () => import('../../views/pages/records/index.vue'),
        meta: { title: '人事资料' },
      },
      {
        path: '/personnel/onboarding',
        component: () => import('../../views/pages/records/card.vue'),
        meta: { title: '入职管理' },
      },
      {
        path: '/personnel/support',
        component: () => import('../../views/pages/records/project.vue'),
        meta: { title: '支援管理' },
      },
    ],
  },
  {
    path: '/system',
    component: BasicLayout,
    meta: { title: '组织管理' },
    show: true,
    sort: 0,

    children: [
      {
        path: '/system/user',
        component: () => import('../../views/system/user/index.vue'),
        meta: { title: '组织架构维护', requireAuth: true },
      },
    ],
  },
  {
    path: '/scheduling',
    component: BasicLayout,
    meta: { title: '排班管理' },
    show: true,
    sort: 3,

    children: [
      {
        path: '/scheduling/advanced',
        component: () => import('../../views/result/success.vue'),
        meta: { title: '高级排班', requireAuth: true },
      },
    ],
  },
  {
    path: '/attendance',
    component: BasicLayout,
    meta: { title: '出勤管理' },
    show: true,
    sort: 4,

    children: [
      {
        path: '/attendance/query',
        component: () => import('../../views/table/base.vue'),
        meta: { title: '快速查询', requireAuth: true },
      },
      {
        path: '/attendance/scheduling',
        component: () => import('../../views/table/scheduling.vue'),
        meta: { title: '员工排班表', requireAuth: true },
        hide: true,
      },
      {
        path: '/attendance/abnormal',
        component: () => import('../../views/table/card.vue'),
        meta: { title: '异常管理', requireAuth: true },
      },
      {
        path: '/attendance/overtime',
        component: () => import('../../views/table/project.vue'),
        meta: { title: '加班单管理', requireAuth: true },
      },
      {
        path: '/attendance/leave',
        component: () => import('../../views/table/article.vue'),
        meta: { title: '请假管理', requireAuth: true },
      },
      {
        path: '/attendance/logs',
        component: () => import('../../views/table/signLogs.vue'),
        meta: { title: '查看考勤记录', requireAuth: true },
      },
      {
        path: '/attendance/cycle',
        component: () => import('../../views/table/article.vue'),
        meta: { title: '考勤周期关闭', requireAuth: true },
      },
    ],
  },
  {
    path: '/statement',
    component: BasicLayout,
    meta: { title: '报表中心' },
    show: true,
    sort: 5,
    children: [
      {
        path: '/statement/myQuery',
        component: () => import('../../views/form/base.vue'),
        meta: { title: '我的查询', requireAuth: true },
      },
      {
        path: '/statement/maintenance',
        component: () => import('../../views/form/step.vue'),
        meta: { title: '报告维护', requireAuth: true },
      },
    ],
  },
  {
    path: '/directive',
    component: BasicLayout,
    meta: { title: '工作流' },
    show: true,
    sort: 6,

    children: [
      {
        path: '/directive/permission',
        component: () => import('../../views/directive/permission.vue'),
        meta: { title: '表单处理', requireAuth: true },
      },
     
    ],
  },
  {
    path: '/systemHide',
    component: BasicLayout,
    meta: { title: '设置' },
    show: false,
    sort: 6,
    children: [
      {
        path: '/directive/setting',
        component: () => import('../../views/system/setting/index.vue'),
        hide:true,
        meta: { title: '配置', requireAuth: true },
      },
      {
        path: '/directive/shift',
        component: () => import('../../views/system/setting/index.vue'),
        hide:true,
        meta: { title: '班别设定', requireAuth: true },
      },
      {
        path: '/directive/calendar',
        component: () => import('../../views/system/calendar/index.vue'),
        hide:true,
        meta: { title: '日历设定', requireAuth: true },
      },
      {
        path: '/directive/device',
        component: () => import('../../views/system/device/index.vue'),
        hide:true,
        meta: { title: '设备', requireAuth: true },
      },
    ],
  },
  {
    path: '/component',
    component: BasicLayout,
    meta: { title: '自助平台' },
    show: true,
    sort: 7,
    children: [
      {
        path: '/component/qrcode',
        component: () => import('../../views/component/qrcode.vue'),
        hide:true,
        meta: { title: '二维码', requireAuth: true },
      },
      {
        path: '/component/barcode',
        component: () => import('../../views/component/barcode.vue'),
        hide:true,

        meta: { title: '条形码', requireAuth: true },
      },
      {
        path: '/component/treeSelect',
        component: () => import('../../views/component/treeSelect.vue'),
        hide:true,

        meta: { title: '下拉树', requireAuth: true },
      },
    ],
  },
];
